"use strict";

var path = require('path');
var webpack = require('webpack');

module.exports = {
    entry: {
        app:'./src/app.js',
        app1:'./src/app1.js',
        main:'./src/main.js'
    },

    output: {
        /* 输出目录，没有则新建 */
        path: path.join(__dirname, 'dist'),
        /* 文件名 */
        filename: "[name].bundle.js",
        publicPath:"dist/"
    },
    module: {
        rules: [
            {
                test:/\.css$/,
                loader:'style-loader!css-loader!autoprefixer-loader'
            },
            {
                test:/\.less$/,
                loader:'style-loader!css-loader!autoprefixer-loader!less-loader'
            },
            {
                test:/\.(jpg|png|svg|ttf|woff|woff2|gif|eot)$/,
                loader:'url-loader',
                options:{
                    limit:4096,
                    name:'[hash:8].[name].[ext]'
                }
            },
            {
                test: /\.vue$/,
                loader: 'vue-loader'
            },
            {
                test: /\.js$/,
                loader: 'babel-loader',
                options:{
                    presets:['es2015'],
                    plugins:['transform-runtime']
                },
                exclude: /node_modules/
            }
        ]
    }
}